package com.jhw.ymcc.web.controller;

import com.jhw.ymcc.result.JSONResult;
import com.jhw.ymcc.service.ICommonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author jhw
 * @create 2022/10/15
 */
@RequestMapping("/common")
@RestController
public class CommonController {

    @Autowired
    private ICommonService commonService;

    @GetMapping("/createToken/{courseId}")
    public JSONResult createToken(@PathVariable("courseId") String courseIds){
        String token = commonService.createToken(courseIds);
        return JSONResult.success(token);
    }

}
